<?php defined("MAIN_DIR") or die("No direct access");

if ($user->isAdmin() && $route->getPath(3) != "logout"){
    to("/admin");
}

switch ($route->getPath(3)) {

	case "":    	require_once ADMIN."auth".DS."form.php"; break;
	case "login":	require_once ADMIN."auth".DS."login.php"; break;
	case "logout":	require_once ADMIN."auth".DS."logout.php"; break;

	default: to("/admin/auth/");
}

?>